<!doctype html>
<html>

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>赤峰哈图</title>
  <meta name="description" content="这是一个 index 页面">
  <meta name="keywords" content="index">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <!-- css文件 -->
  {include file="public/title" /}
</head>

<body data-type="generalComponents">
  <!-- 头部 -->
  {include file="public/header" /}
  <div class="tpl-page-container tpl-page-header-fixed">
    <!-- 左侧导航 -->
    {include file="public/leftNav" /}
    <div class="tpl-content-wrapper">
      <ol class="am-breadcrumb">
        <li><a href="#" class="am-icon-home">首页</a></li>
        <li><a href="#">系统</a></li>
        <li class="am-active">配置项</li>
      </ol>
      <div class="tpl-portlet-components">
        <div class="tpl-block">
          <div class="am-g tpl-amazeui-form">
            <div class="am-u-sm-12 am-u-md-9">
              <form class="am-form am-form-horizontal" method="post" action="">
                <?php foreach($conf as $k => $v):?>
                <div class="am-form-group">
                  <label for="user-name" class="am-u-sm-3 am-form-label"><?php echo $v['cnname'];?></label>
                  <div class="am-u-sm-9">
                    <?php if($v['type']==1):?>
                    <input type="text" name="<?php echo $v['enname'];?>" required oninvalid="setCustomValidity('请输入您的姓名');" oninput="setCustomValidity('');" id="user-name" value="<?php echo $v['value'];?>">
                    <?php elseif($v['type']==2):?>
                    <textarea name="<?php echo $v['enname'];?>" rows="5" id="user-intro"><?php echo $v['value'];?></textarea>
                    <?php elseif($v['type']==3):
                      if($v['values']){
                        $arr = explode(',',$v['values']);
                      }
                      foreach($arr as $k1 => $v1):
                    ?>
                      <label class="am-radio-inline">
                        <input type="radio" <?php if($v['value']==$v1):?>checked<?php endif;?> name="<?php echo $v['enname'];?>" value="<?php echo $v1;?>" /> <?php echo $v1;?>
                      </label>
                    <?php endforeach;?>
                    <?php elseif($v['type']==4):?>
                      <label class="am-checkbox-inline">
                        <input type="checkbox" <?php if($v['value']==$v['values']):?>checked<?php endif?> name="<?php echo $v['enname'];?>" value="<?php echo $v['values'];?>"> <?php echo $v['values'];?>
                      </label>
                    <?php elseif($v['type']==5):
                      if($v['values']){
                        $arrsel = explode(',',$v['values']);
                      }
                    ?>
                      <select name="<?php echo $v['enname'];?>" data-am-selected="{searchBox: 1}">
                        <?php foreach($arrsel as $k2 => $v2):?>
                          <option <?php if($v['value']==$v2):?>selected<?php endif;?> value="<?php echo $v2;?>"><?php echo $v2;?></option>
                        <?php endforeach;?>
                      </select>
                    <?php endif;?>
                  </div>
                </div>
                <?php endforeach;?>
                <div class="am-form-group">
                  <div class="am-u-sm-9 am-u-sm-push-3">
                    <button type="submit" class="am-btn am-btn-primary">确定</button>
                  </div>
                </div>
              </form>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  <!-- js -->
  {include file="public/foot" /}
</body>

</html>